import * as React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';

import Login from './screens/Login';
import Main from './screens/Main';
import Products from './screens/Products';
import Detail from './screens/Detail';

const Stack = createStackNavigator();

function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen
          name="Login"
          component={Login}
          options={{title: '管理员登录'}}
        />

        <Stack.Screen
          name="Main"
          component={Main}
          options={{title: '主菜单'}}
        />

        <Stack.Screen
          name="Products"
          component={Products}
          options={{title: '产品列表'}}
        />

        <Stack.Screen
          name="Detail"
          component={Detail}
          options={{title: '产品详情'}}
        />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

export default App;
